package com.zzl.pensionorder.controller;

import com.zzl.entiey.User;
import com.zzl.util.RedisUtil;
import com.zzl.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName: HelloController
 * @Description: GOOD
 * @author: ZZL
 * @date: 2021/7/5  8:39
 */
@RestController
public class HelloController {

    @Autowired
    RedisUtil redisUtil;

    @RequestMapping("/hello")
    public Result hello(){
        User user = new User();
        user.setUsername("123");
        redisUtil.set("1","2",60);
        return Result.succ(redisUtil.get("1"));
    }
}
